#pragma once
#include "Connection.h"
#include "Conn.h"
#include "ConnManager.h"

class CDBServer : public CConnection
{
protected:
	virtual xgc_void RegisteMessage();
	virtual xgc_lpvoid OnAccept( net::network_t h, xgc_long_ptr from );
	virtual xgc_void OnClose( xgc_lpvoid userdata );

public:
	xgc_void StartServer( xgc_lpcstr address, xgc_uint16 port, xgc_uint16 test_invent, xgc_uint16 timeout );
	xgc_void StopServer();
	//Conn* GetConn(){return m_conn;};

protected:
	xgc_void CheckUserInfo( net::network_t h, xgc_lpvoid u, const unsigned char* data, size_t size );

private:
	xgc_long_ptr mServer;

};